import Vue from 'vue'
import Router from 'vue-router'

// 引入路由组件
import home from 'components/home' // 首页
import shareContent from 'components/shareContent'
import aboutContent from 'components/aboutContent'
import downloadContent from 'components/downloadContent'
import jobContent from 'components/jobContent'
import latestMessage from 'components/latestMessage'

import htx from 'components/htx' // Hextra（hxt）
import htxBonus from 'components/htxBonus' // 佣金计划
import htxCommission from 'components/htxCommission' // 奖金制度
import htxDiscounts from 'components/htxDiscounts' // 优惠扶持
import htxRegist from 'components/htxRegist' // 注册流程
import htxArticle from 'components/htxArticle'

Vue.use(Router)

export default new Router({
	routes: [{
		name: "home",
		path: '/',
		component: home
	}, {
		name: "aboutContent",
		path: '/about',
		component: aboutContent

	}, {
		name: "shareContent",
		path: '/share',
		component: shareContent
	}, {
		name: "jobContent",
		path: '/job',
		component: jobContent
	}, {
		name: "latestMessage",
		path: '/latest',
		component: latestMessage
	}, {
		name: "downloadContent",
		path: '/download',
		component: downloadContent
	}, {
		name: "htx",
		path: '/htx',
		component: htx
	}, {
		name: "htxBonus",
		path: '/htxBonus',
		component: htxBonus
	}, {
		name: "htxCommission",
		path: '/htxCommission',
		component: htxCommission
	}, {
		name: "htxDiscounts",
		path: '/htxDiscounts',
		component: htxDiscounts
	}, {
		name: "htxRegist",
		path: '/htxRegist',
		component: htxRegist
	}, {
		name: "htxArticle",
		path: '/htxArticle',
		component: htxArticle
	}],
	scrollBehavior(to, from, savedPosition) {
		console.log(to, from, savedPosition);
		return {
			x: 0,
			y: 0
		};
	},
//	mode: 'history'
})